package net.lovesrc.allin.jobs.backup;

import net.lovesrc.allin.biz.DogDog.DogDogRegister;
import net.lovesrc.allin.jobs.base.BaseJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

import java.util.concurrent.atomic.AtomicBoolean;

@Component
@Profile("2021")
public class DogDogRegisterJob  extends BaseJob {
    public AtomicBoolean flag = new AtomicBoolean(true);
    public String inviteCode = "S149986"; //H137186->S149986->

    @Autowired
    DogDogRegister dogDogRegister;

    @Override
    public void runOnce() {
        dogDogRegister.register(inviteCode);
    }

    @Override
    public boolean runFlag() {
        return flag.get();
    }
}
